home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 06 - 1990 / 06.01 Jan 90 / DLL Source Code / SampHHH.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-08-27  |  1.3 KB  |  47 lines  |  [TEXT/MPS ]

  1. /************************************************/
  2. /*                  Sample DLL's                */
  3. /*       Copyright © Vincent Parsons 1989.      */
  4. /************************************************/
  5. /*    DLL code for MPW C 3.0 or THINK C 4.0     */
  6. /*       with Excel for the Macintosh 2.2       */
  7. /*             and Microsoft C 5.1              */
  8. /*          with Excel for Windows 2.1          */
  9. /************************************************/
  10. /* SampHHH is an example of two data type H     */
  11. /* inputs and one data type H output.  The      */
  12. /* output is the product of the two type H      */
  13. /* inputs.                                      */
  14. /************************************************/
  15. /*   =REGISTER("SampDLLs","SampHHH","HHH")      */
  16. /*   for both the Mac and the PC.               */
  17. /************************************************/
  18.  
  19. #include "DLL.h"
  20.  
  21. #if applec
  22. #include <Types.h>
  23.  
  24. #elif MSDOS
  25. #include <windows.h>
  26.  
  27. #endif
  28.  
  29. #if THINK_C
  30. pascal unsigned short main(unsigned short u1, unsigned short u2);    /* prototype */
  31.  
  32. pascal unsigned short main(u1, u2)
  33. unsigned short u1;
  34. unsigned short u2;
  35.  
  36. #elif applec
  37. pascal unsigned short SampHHH(unsigned short u1, unsigned short u2)
  38.  
  39. #elif MSDOS
  40. unsigned short far pascal SampHHH(unsigned short u1, unsigned short u2)
  41. #endif
  42. {
  43.     return ( u1 * u2 );
  44. }
  45.  
  46. /************************************************/
  47.